<%
user = User.new if !user
type = (blasted) ? blasted.class.to_s : ""
id = (blasted) ? blasted.id : ""
partial = "" if !partial
url = request.env['REQUEST_PATH'] if !url
from = "" if !from
subject = "Take a look at this..." if !subject
message = "Insane! I can't believe it." if !message
recipients = (user.id) ? Blast.new.past_recipients(user.id) : ""
%>

<script type="text/javascript">
	var blast = {
		type:"<%=type%>",
		id:"<%=id%>",
		partial:"<%=partial%>",
		url:"<%=url%>",
		from:"<%=user.name%>",
		subject:"<%=subject%>",
		message:"<%=message%>",
		recipients: "<%=recipients%>"
	}
	// hook events...
 	Event.observe(window, 'load', get_blast_form, false);
</script>
<div id="blast">
	<div id="blast_flash"></div>
	<div id="blast_form"></div>
	<div id="blast_preview">
		<h1>Preview Message</h1>
		<div id="blast_preview_to"></div>
		<div id="blast_preview_from"></div>
		<hr />
		<div id="blast_preview_subject"></div>
		<div id="blast_preview_message"></div>
		<hr />
		<div id="blast_preview_partial"></div>
	</div>
</div>